package cn.yuanqiao.archive.shuzihua.domain;

import cn.yuanqiao.common.annotation.Excel;
import cn.yuanqiao.common.exception.ServiceException;
import cn.yuanqiao.common.utils.StringUtils;
import cn.yuanqiao.common.core.domain.BaseEntity;
import cn.yuanqiao.common.utils.SecurityUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 日志详细信息对象 YQ_CATALOG_DIS
 *
 * @ProjectName: cn.yuanqiao.archive.shuzihua.domain
 * @ClassName: YqCatalogDis
 * @Author: lenovo
 * @Description: hbWang
 * @Date: 2024/1/19 14:19
 * @Version: 1.0
 **/
public class YqCatalogDis extends BaseEntity {
    private static final long serialVersionUID = 1L;


    private final String BIGTABLENAME = "_YQ_CATALOG_DIS";

    public YqCatalogDis() {
        String tenantCode = SecurityUtils.getTenantCode();
        if (StringUtils.isEmpty(tenantCode)) {
            throw new ServiceException("tenantCode is null");
        } else {
            this.tableName = tenantCode.toUpperCase() + BIGTABLENAME;
        }
    }

    private String tableName;

    @Excel(name = "序号",isSeq = true)
    private Long seq;


    /**
     * 主键
     */
    private Long id;

    /**
     * 日志表主键
     */
    private Long logId;

    /**
     * 失败数据
     */
    @Excel(name = "失败数据")
    private String failData;

    /**
     * 日志信息
     */
    @Excel(name = "日志信息")
    private String msg;

    public Long getSeq() {
        return seq;
    }

    public void setSeq(Long seq) {
        this.seq = seq;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setLogId(Long logId) {
        this.logId = logId;
    }

    public Long getLogId() {
        return logId;
    }

    public void setFailData(String failData) {
        this.failData = failData;
    }

    public String getFailData() {
        return failData;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public String getMsg() {
        return msg;
    }

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("logId", getLogId())
                .append("failData", getFailData())
                .append("msg", getMsg())
                .toString();
    }
}
